#include<iostream>
#include <cstdio>
#include <cstring>
using namespace std;

int main()
{
    int n;
	int pig[20]; 
	cin>>n;
	memset(pig,0,sizeof(pig));
    pig[1]=1;
    for (int i=2;i<=n;i++)
    {
    	pig[i] = pig[i-1]*2 - pig[i-2];
		pig[i-1] -=	pig[i-2];  		
    }
    cout << pig[n] << endl;
    return 0;    
}
